package com.lanou.sinasports.greenevents;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.lanou.sinasports.greenevents.Eve;
import com.lanou.sinasports.greenevents.MatHot;

import com.lanou.sinasports.greenevents.EveDao;
import com.lanou.sinasports.greenevents.MatHotDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig eveDaoConfig;
    private final DaoConfig matHotDaoConfig;

    private final EveDao eveDao;
    private final MatHotDao matHotDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        eveDaoConfig = daoConfigMap.get(EveDao.class).clone();
        eveDaoConfig.initIdentityScope(type);

        matHotDaoConfig = daoConfigMap.get(MatHotDao.class).clone();
        matHotDaoConfig.initIdentityScope(type);

        eveDao = new EveDao(eveDaoConfig, this);
        matHotDao = new MatHotDao(matHotDaoConfig, this);

        registerDao(Eve.class, eveDao);
        registerDao(MatHot.class, matHotDao);
    }
    
    public void clear() {
        eveDaoConfig.getIdentityScope().clear();
        matHotDaoConfig.getIdentityScope().clear();
    }

    public EveDao getEveDao() {
        return eveDao;
    }

    public MatHotDao getMatHotDao() {
        return matHotDao;
    }

}
